import { App } from 'vue'
import {
    Button, Icon, Swipe, SwipeItem, Skeleton, Search, Notify, Grid, GridItem, Lazyload, List, NavBar, ActionBar, ActionBarIcon, ActionBarButton, Sticky, ShareSheet, DropdownMenu, DropdownItem, Empty, PullRefresh, Checkbox, CheckboxGroup, ActionSheet, SubmitBar, Stepper, Loading, AddressEdit, Area, CountDown, Tab, Tabs, NoticeBar, Uploader, Field, Form, Popup, Overlay, ImagePreview, PasswordInput, NumberKeyboard, Calendar, DatetimePicker,Image as VanImage,Dialog
} from 'vant'

const components = [
    Button, Icon, Swipe, SwipeItem, Skeleton, Search, Grid, GridItem, Lazyload, List, NavBar, ActionBar, ActionBarIcon, ActionBarButton, Sticky, ShareSheet, DropdownMenu, DropdownItem, Empty, PullRefresh, Checkbox, CheckboxGroup, ActionSheet, SubmitBar, Stepper, Loading, AddressEdit, Area, CountDown, Tab, Tabs, NoticeBar, Uploader, Field, Form, Popup, Overlay, ImagePreview, PasswordInput, NumberKeyboard, Calendar, DatetimePicker,VanImage,Dialog
]

const plugins = [
    Notify
]

export function setupvant(app: App<any>) {
    components.forEach(component => {
        app.use(component as any);
    })
    plugins.forEach(plugin => {
        app.use(plugin as any)
    })
}
